<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml" xmlns:v-demo="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .router-link-active {
            color:#f00;
        }
        pre {
            font-family: sans-serif;
            font-size: 1em;
            line-height:1.5em;
        }

    </style>
</head>
<body>

<div id="app">
    <ul>
        <li><router-link to="/a">a</router-link></li>
        <li><router-link to="/b">b</router-link></li>
    </ul>
    <transition>
        <router-view></router-view>
    </transition>
</div>
</body>

<script src="../../../vender/vue@2.4.2.js"></script>
<script src="../../../vender/vue-router@2.7.0.js"></script>

<script>
    const A={template:'<div>A</div>'};
    const B={template:'<div>B</div>'};

    const router=new VueRouter({
        routes:[
            {path:'/a',component:A},
            {path:'/b',component:B}
        ]

    });

    const app=new Vue({
        el:'#app',
        router
    });

</script>
</html>